<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib prefix="rapid" uri="http://www.rapid-framework.org.cn/rapid" %>
<rapid:override name="title">
    -帖子详情
</rapid:override>
<rapid:override name="header-style">
</rapid:override>

<rapid:override name="content">
    <blockquote class="layui-elem-quote">
        <span class="layui-breadcrumb" lay-separator="/">
          <a href="/backIndex/homepage">首页</a>
          <a>帖子详情</a>
        </span>
    </blockquote>

    <div class="layui-tab layui-tab-card">
        <form id="articleForm" method="post">
            <input type="hidden" name="currentUrl" id="currentUrl" value="">
            <table class="layui-table">
                <colgroup>
                    <col width="50">
                    <col width="100">
                    <col width="600">
                    <col width="100">
                    <col width="50">
                </colgroup>
                <thead>
                <tr>
                    <th>楼层数</th>
                    <th>用户</th>
                    <th>回复内容</th>
                    <th>回复时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <c:forEach items="${pageInfo.list}" var="floor" varStatus="s">
                    <tr>
                        <td align="center">
                            ${(pageInfo.pageNum-1)*pageInfo.pageSize+s.index+2}楼
                        </td>
                        <td align="center">
                            ${floor.commentAuthorName}
                        </td>
                        <td>
                            <a href="/post/${floor.commentPostId}"
                               target="_blank">
                                    ${fn:substring(floor.commentContent, 0, 30)}
                            </a></td>
                        <td>
                            <fmt:formatDate value="${floor.commentCreateTime}" pattern="yyyy年MM月dd日 HH:mm"/>
                        </td>
                        <td align="center">
                        <a href="/post/postDetail/delete/${floor.commentId}" class="layui-btn layui-btn-danger layui-btn-mini"
                           onclick="return confirmDelete()">删除</a>

                    </tr>
                </c:forEach>
                </tbody>
            </table>
        </form>
    </div>

</rapid:override>
<rapid:override name="footer-script">
    <script></script>
</rapid:override>
<%@ include file="../Public/framework.jsp" %>
